-
Notifications
You must be signed in to change notification settings - Fork 1
Fault feature panel upgrade #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com>
Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com>
Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com>
Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com>
Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a comprehensive upgrade to the fault feature panel and debugging capabilities for the LoopStructural QGIS plugin. The changes add debug directory management, parameter logging for map2loop tools, and UI improvements to enable interactive fault parameter editing with live model updates.
Changes:
- Added debug manager infrastructure with configurable debug directory and automatic logging/export of tool parameters and layers
- Implemented Observable pattern for model updates and added debounced rebuilds for interactive fault parameter editing
- Enhanced map2loop tool dialogs to accept and use debug_manager for parameter logging and layer export
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 63 comments.
Show a summary per file
| File | Description |
|---|---|
| loopstructural/debug_manager.py | New debug manager with session directories, parameter logging, and layer export |
| loopstructural/toolbelt/preferences.py | Added debug_directory setting and logging configuration |
| loopstructural/main/model_manager.py | Converted to Observable, added notification suspension and feature update methods |
| loopstructural/gui/dlg_settings.py | Added debug directory UI controls |
| loopstructural/plugin_main.py | Integrated debug_manager and added fault topology action |
| loopstructural/main/m2l_api.py | Added debug_manager parameter to map2loop API functions |
| loopstructural/gui/modelling/geological_model_tab/feature_details_panel.py | Implemented debounced rebuilds and fault parameter controls |
| loopstructural/gui/visualisation/feature_list_widget.py | Added model update observers and surface re-rendering |
| loopstructural/gui/map2loop_tools/*.py | Added debug manager integration to all map2loop tool widgets |
| loopstructural/main/debug/export.py | New debug package export utility |
| tests/qgis/test_plg_preferences.py | Added tests for debug_directory setting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from loopstructural.main.debug import export | ||
|
|
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import. The 'export' module is imported but never used. Remove this import or use the export functionality.
| from loopstructural.main.debug import export |
| if unit_name_field and unit_name_field != 'UNITNAME' and unit_name_field in geology_gdf.columns: | ||
| if ( | ||
| unit_name_field | ||
| and unit_name_field != unit_name_field |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition 'unit_name_field != unit_name_field' is always False. This appears to be a copy-paste error and will cause the code block to never execute. This condition should likely compare unit_name_field against 'UNITNAME' or another constant.
| and unit_name_field != unit_name_field |
loopstructural/gui/modelling/geological_model_tab/feature_details_panel.py
Outdated
Show resolved
Hide resolved
| payload = params if params is not None else self.get_parameters() | ||
| payload = self._serialize_params_for_logging(payload, context_label) | ||
| self._debug.log_params(context_label=context_label, params=payload) | ||
| except Exception: |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| if getattr(self, "_debug", None): | ||
| try: | ||
| self._debug.log_params(context_label=context_label, params=params) | ||
| except Exception: |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| logger.debug(f"Removed existing mesh: {mesh_name}") | ||
| except Exception: | ||
| logger.debug(f"Failed to remove existing mesh: {mesh_name}") | ||
| pass |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary 'pass' statement.
| except Exception as e: | ||
| print("Failed to save sampler debug info") | ||
| print(e) | ||
| pass |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary 'pass' statement.
No description provided.